package cn.jtcoding.order.api;

import cn.jtcoding.common.framework.pagehelper.PagedGridResult;
import cn.jtcoding.order.pojo.bo.SubmitOrderBO;
import cn.jtcoding.order.pojo.dataobject.OrderStatusDO;
import cn.jtcoding.order.pojo.dataobject.OrdersDO;
import cn.jtcoding.order.pojo.vo.OrderVO;
import org.springframework.web.bind.annotation.RequestParam;

public interface OrderService {
    /**
     * 用于创建订单相关信息
     */
    OrderVO createOrder(SubmitOrderBO submitOrderBO);

    /**
     * 修改订单状态
     */
    void updateOrderStatus(String orderId, Integer orderStatus);

    /**
     * 查询订单状态
     */
    OrderStatusDO queryOrderStatusInfo(String orderId);

    /**
     * 关闭超时未支付订单
     */
    void closeOrder();

    PagedGridResult listUserOrders(String userId,
                                   Integer orderStatus,
                                   Integer page,
                                   Integer pageSize);

    void updateDeliverOrderStatus(String orderId);

    boolean deleteOrder(String userId, String orderId);

    OrdersDO queryMyOrder(String userId, String orderId);
}
